home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / ezy_comm / ezy1023.zip / SETUP.ZIP / UPCONV.BAT < prev    next >
DOS Batch File  |  1992-10-09  |  3KB  |  183 lines

  1. @echo off
  2. rem ********************************************
  3. rem **                                        **
  4. rem **             UpConv.Bat                 **
  5. rem **                                        **
  6. rem **      Copyright Peter Davies 1992       **
  7. rem **        All Rights Reserved             **
  8. rem **                                        **
  9. rem **        For use with Ezycom Only        **
  10. rem **                                        **
  11. rem ********************************************
  12. echo Converting *  %4.%6 to %4.%5
  13. echo Testing %4.%6 for Integrity
  14.  
  15. rem If called stand alone, it checks to see if enough parameters were
  16. rem passed to the batch file
  17.  
  18. if !%5! == !! goto endit
  19.  
  20. rem This is a list of the command line in upconv.bat and doconv.bat (Ezycom)
  21.  
  22. rem %1 C:\EZY\SECUPLD\           where uploaded
  23. rem %2 C:\EZY\TEMP\CONV01        where it does it
  24. rem %3 C:                        drive it is on
  25. rem %4 LIST                      file name no ext
  26. rem %5 ZIP                       ext to
  27. rem %6 ARJ                       ext from (could be NULL)
  28.  
  29. :start
  30. if exist %2\*.* goto :del
  31.  
  32. %3
  33. md %2
  34. cd %2
  35.  
  36. if %6 == TXT goto moveit
  37. if %6 == DOC goto moveit
  38. if %6 == LST goto moveit
  39. if %6 == PAS goto moveit
  40. if %6 == C   goto moveit
  41. FOR %%A IN (LZH ZIP ARC PAK SDN ZOO ARJ SQZ COM EXE) DO IF %%A == %6 GOTO WAS%6
  42. goto :finish
  43.  
  44. :moveit
  45. copy %1%4.%6 %2
  46. goto now%5
  47.  
  48. :del
  49. attrib -A -S -H -R %2\*.*
  50. echo Y | del %2\*.*
  51. rd  %2
  52. goto start
  53.  
  54. :waszip
  55. cd %2
  56. pkunzip -o %1%4.%6
  57. rem Bad Zip
  58. if errorlevel 51 goto dodel
  59. rem Disk Full
  60. if errorlevel 50 goto finish
  61. rem Bad Zip
  62. if errorlevel  9 goto dodel
  63. rem Not Enough Memory
  64. if errorlevel  4 goto finish
  65. rem Bad Zip
  66. if errorlevel  1 goto dodel
  67. rem Zip OK
  68. goto scan
  69.  
  70. :waslzh
  71. cd %2
  72. lha e /cnm %1%4.%6
  73. if errorlevel 1 goto dodel
  74. goto scan
  75.                     
  76. :wasarc
  77. cd %2
  78. PKXARC -r %1%4.%6
  79. if errorlevel 1 goto dodel
  80. goto scan
  81.  
  82. :wassdn
  83. :waspak
  84. cd %2
  85. PAK e /wa %1%4.%6
  86. if errorlevel 1 goto dodel
  87. goto scan
  88.  
  89. :wasarj
  90. cd %2
  91. arj e -y %1%4.%6
  92. rem Bad ARJ
  93. if errorlevel 9 goto dodel
  94. rem Not enough Memory
  95. if errorlevel 8 goto finish
  96. rem Bad ARJ
  97. if errorlevel 6 goto dodel
  98. rem Disk Full
  99. if errorlevel 5 goto finish
  100. rem Bad ARJ
  101. if errorlevel 1 goto dodel
  102. goto scan
  103.  
  104. :waszoo
  105. cd %2
  106. ZOO -e %1%4.%6
  107. if errorlevel 1 goto dodel
  108. goto scan
  109.  
  110. :wassqz
  111. cd %2
  112. SQZ x /o1 %1%4.%6
  113. if errorlevel 1 goto dodel
  114. goto scan
  115.  
  116. :wascom
  117. :wasexe
  118. copy %1%4.%6 %2
  119. scan /NOMEM %2
  120. if errorlevel 1 goto dodel
  121. goto finish
  122.  
  123. :dodel
  124. echo Deleting %1%4.%6 A Virus or Bad Archive
  125. del %1%4.%6
  126. goto finish
  127.  
  128. :scan
  129. cd \
  130. SCAN /NOMEM %2
  131. if errorlevel 1 goto dodel
  132. goto now%5
  133.  
  134. :nowzip
  135. if exist %1%4.%6 del %1%4.%6
  136. cd \
  137. pkzip -mo %1%4 %2\*.*
  138. goto finish
  139.  
  140. :nowlzh
  141. if exist %1%4.%6 del %1%4.%6
  142. cd \
  143. lha a -tm %1%4 %2\*.*
  144. goto finish
  145.  
  146. :nowarc
  147. if exist %1%4.%6 del %1%4.%6
  148. cd \
  149. pkarc -oct -a %1%4 %2\*.*
  150. goto finish
  151.  
  152. :nowpak
  153. if exist %1%4.%6 del %1%4.%6
  154. cd \
  155. pak A /O /WA /L %1%4 %2\*.*
  156. goto finish
  157.  
  158. :nowarj
  159. if exist %1%4.%6 del %1%4.%6
  160. cd \
  161. arj a -ey %1%4 %2\*.*
  162. goto finish
  163.  
  164. :nowzoo
  165. if exist %1%4.%6 del %1%4.%6
  166. cd \
  167. zoo -a %1%4 %2\*.*
  168. goto finish
  169.  
  170. :nowsqz
  171. if exist %1%4.%6 del %1%4.%6
  172. cd \
  173. sqz a /m4 /q0
  174. goto finish
  175.  
  176. :finish
  177. cd \
  178. attrib -A -S -H -R %2\*.*
  179. echo Y | del %2\*.*
  180. rd %2
  181. :ENDIT
  182.  
  183.